﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
        .droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
        .draggable, .draggable-nonvalid { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:Panel ID="Panel3" runat="server" CssClass="ui-widget-content draggable-nonvalid">
        <p>
            I'm draggable but can't be dropped</p>
    </asp:Panel>
    <asp:Panel ID="Panel1" runat="server" CssClass="ui-widget-content draggable draggable">
        <p>
            Drag me to my target</p>
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server" CssClass="ui-widget-header droppable droppable">
        <p>
            accept: 'Pane1'</p>
    </asp:Panel>
    <DotNetAge:Draggable ID="Draggable1" runat="server">
        <Target TargetIDs="Panel1,Panel3" />
    </DotNetAge:Draggable>
    <DotNetAge:Droppable ID="Droppable1" runat="server" ActiveCssClass="ui-state-hover"
        HoverCssClass="ui-state-active" OnClientDrop="$(this).addClass('ui-state-highlight').find('p').html('Dropped!');">
        <Target TargetID="Panel2" />
        <Accept TargetID="Panel1" />
    </DotNetAge:Droppable>
    </form>
</body>
</html>
